﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLTV_Public;
using System.Data;

namespace QLTV_Data
{
   public class CT_PhieuPhat_Data
    {
       KetNoiCSDL_Data kn = new KetNoiCSDL_Data();

       public DataTable TaoBang(string sql)
       {
           return kn.taobang(sql);
       }
       public int Insert(CT_PhieuPhat_Public obj)
       {
           int Npara = 6;
           string[] name = new string[Npara];
           object[]value=new object[Npara];
           name[0] = "@MaPhieuPhat";
           value[0] = obj.MaPhieuPhat;
           name[1] = "@SoCaBiet";
           value[1] = obj.SoCaBiet;
           name[2] = "@MaViPham";
           value[2] = obj.MaViPham;
           name[3] = "@SoNgayQuaHan";
           value[3] = obj.SoNgayQuaHan;
           name[4] = "@MucPhat";
           value[4] = obj.MucPhat;
           name[5] = "@ThanhTien";
           value[5] = obj.ThanhTien;

           return kn.update("Insert_CT_PhieuPhat",name,value,Npara);
       }
    }
}
